package com.starry.core.web.core.controller;

import com.starry.core.common.domain.R;

/**
 * @Description 基础控制器
 * @Author xiaoke
 *
 */
public class BaseController {
    public R<Void> success() {
        return R.success();
    }

    public <T> R<T> success(T data) {
        return R.success(data);
    }

    public <T> R<T> success(int code, T data) {
        return R.success(code, data);
    }

    public R<Void> fail() {
        return R.fail();
    }

    public <T> R<T> fail(int code, String msg) {
        return R.fail(code, msg);
    }
}
